var $ = function(id)
{
    return document.getElementById(id);
}

var setupButtonHandlers = function()
{
    if ($("registerButton"))
        $("registerButton").onclick = registerButtonOnClick;

    if ( $("signInButton"))
        $("signInButton").onclick = signInButtonOnClick;
}

var registerButtonOnClick = function()
{
    $("registerButton").disabled = "disabled";
    $("registrationForm").submit();
}

var signInButtonOnClick = function()
{
    $("signInButton").disabled = "disabled";
    $("signInForm").submit();
}

jsLib.dom.ready(setupButtonHandlers);